import { getTyelist } from '@/API/index'
export default {
  state: {
    typelist: [],
    currentId: ''
  },
  mutations: {
    setlist (state, value) {
      state.typelist = value
    },
    setCurrentId (state, value) {
      state.currentId = value
    }

  },
  actions: {
    async getlist (context) {
      const res = await getTyelist()
      context.commit('setlist', res.data.data.channels)
      context.commit('setCurrentId', res.data.data.channels[0].id)
      console.log(res, 111)
    }
  },
  getters: {},
  namespaced: true
}
